package com.zyq.core.controller;

import com.zyq.common.entity.course.subject.EduSubject;
import com.zyq.common.vo.Result;
import com.zyq.core.service.SubjectService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 翟彦淇
 * @description TODO
 * @date 2022/12/5 20:33
 */
@RestController
@RequestMapping("/core/subject")
@Api(value = "课程分类控制层")
public class SubjectController {
    @Autowired
    private SubjectService subjectService;
    @PostMapping("/findSubjectByStatus/{status1}/{status2}")
    @ApiOperation("查询课程的一、二、三级分类")
    public Result<List<EduSubject>> findSubjectByStatus(@PathVariable String status1,@PathVariable String status2){
        return subjectService.findSubjectByStatus();
    }
}
